#ifndef _MODBUS_APP_H
#define _MODBUS_APP_H

#include <board.h>
#include <rtthread.h>
#include <stdbool.h>

void thread_entry_ModbusMasterPoll(void *parameter);
void thread_entry_ModbusMasterExec(void *parameter);
//void thread_enrty_ModbusMdReadSd(void* parameter);

void userWriteHoldingRegister(uint16_t ucSndAddr, uint16_t usRegAddr, uint16_t data, bool isUrgent);
void userWriteMultipleHoldingRegister(uint16_t ucSndAddr, uint16_t usRegAddr, uint16_t usNRegs, uint16_t *pusDataBuffer, bool isUrgent);
void userReadMultipleHoldingRegister(uint16_t ucSndAddr, uint16_t usRegAddr, uint16_t usNRegs, bool isUrgent);
void userWriteSingleHoldingRegister(uint16_t ucSndAddr, uint16_t usRegAddr, uint16_t data, bool isUrgent);
void modbusLowPowerProcess(bool flag);

#endif

